<!DOCTYPE html>
<html>
{include file="public/head"}

<body>
    {include file="contest/contest-nav"}
    <br/>
    
    </div>
    <div class="layui-row">
        <div class="layui-col-lg8">
            <div class="fly-panel contest-discuss-8">
                <form class="layui-form" method="post" action="{:url('web/Contestdiscuss/do_post_discuss')}">
                    <input name='cid' value="{$cid}" class="layui-hide" />
                    <textarea name='content' id='content' class="layui-hide"></textarea>
                    <div id='content-ed'></div>
                    <br />
                    <div>
                        <div class="layui-inline status-input-comb">
                            <select name='num'>
                                <option value="-1">public 通用提问</option>
                                {foreach $problemlist as $k=>$v}
                                    <option value="{$v.num}">{$v.no} - {$v.alias?$v.alias:$v.problem_title}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class='layui-inline' >
                            <button class='layui-btn'>提问&走起</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="layui-col-lg4">
            <div class="fly-panel contest-discuss-4">
                <div style="text-align: center;">
                    <a class="layui-btn layui-inline" href="{:url('web/Contest/show',['cid'=>$cid])}">返回比赛</a>
                </div>
            </div>
        </div>
    </div>
    
    

    </div>
    
     {include file="public/foot"}
	 {include file="contest/post-notice"}
</body>
<script>
    layui.use(['jquery','form','element'],function(){
        var form=layui.form;
        var $=layui.jquery;
        var element=layui.element;
        form.render();      
    });
</script>
<script type="text/javascript" src="__STATIC__/WE/wangEditor.min.js"></script>
<script>

layui.use(['form','jquery'],function(){
    var $=layui.jquery;
    
    var E = window.wangEditor;  
        var editor = new E('#content-ed');
        var $text1 = $('#content');
        editor.customConfig.onchange = function (html) {
            // 监控变化，同步更新到 textarea
            $text1.val(html);
        };
        editor.customConfig.zIndex = 0;
        editor.customConfig.menus = [
        'head',  // 标题
    'bold',  // 粗体
    'fontSize',  // 字号
    'fontName',  // 字体
    'italic',  // 斜体
    'underline',  // 下划线
    'strikeThrough',  // 删除线
    'foreColor',  // 文字颜色
    'backColor',  // 背景颜色
    'link',  // 插入链接
    'list',  // 列表
    'justify',  // 对齐方式
    'quote',  // 引用
    'image',  // 插入图片
    'table',  // 表格
    'code',  // 插入代码
    'undo',  // 撤销
    'redo'  // 重复
    ];
        editor.create();
        $text1.val(editor.txt.html());
});

</script>



</html>